/**
 * @param {number[][]} matrix
 * @param {number} target
 * @return {boolean}
 */
var findNumberIn2DArray = function(matrix, target) {
    // 暴力解法
    let row = matrix.length - 1
    let column = 0
    while (row >= 0 && column <= matrix.length - 1) {
        if (matrix[row][column] == target) {
            return true
        }else if (matrix[row][column] > target) {
            row--
        }else {
            column++
        }
    }
    return false
};
let matrix =
    [
        // [1,4,7,11,15],
        // [2,5,8,12,19],
        // [3,6,9,16,22],
        // [10,13,14,17,24],
        // [18,21,23,26,30]
    [1,1]
    ];
// let matrix = [[-5]]
let target = 9
console.log(findNumberIn2DArray(matrix, target))